import http from './http'

export function registerUser(data) {
  return http.post('/api/user/register', data)
}

export function updateUser(id, data) {
  return http.put('/api/user/update', data, { params: { id } })
}

export function getUserInfo(id) {
  return http.get('/api/user/info', { params: { id } })
}

export function deleteUser(id) {
  return http.delete('/api/user/delete', { params: { id } })
}

export function updatePassword(id, password) {
  return http.put('/api/user/updatePassword', null, { params: { id, password } })
}


